From 87f3dac8ba8dea5628b05416bdef454b4ef2d236 Mon Sep 17 00:00:00 2001
From: Charlie Li <git@vishwin.info>
Date: Mon, 14 Mar 2022 17:36:36 -0400
Subject: [PATCH] LibreSSL 3.5 opaqued structures

Downloaded from upstream commit
https://github.com/znc/Csocket/commit/87f3dac8ba8dea5628b05416bdef454b4ef2d236

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
(rebased for znc)
---
 Csocket.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Csocket.cc b/Csocket.cc
index 46a3bfd..a30da14 100644
--- a/third_party/Csocket/Csocket.cc
+++ b/third_party/Csocket/Csocket.cc
@@ -61,7 +61,7 @@
 #  define OPENSSL_NO_TLS1_1            /* 1.0.1-pre~: openssl/openssl@637f374ad49d5f6d4f81d87d7cdd226428aa470c */
 #  define OPENSSL_NO_TLS1_2            /* 1.0.1-pre~: openssl/openssl@7409d7ad517650db332ae528915a570e4e0ab88b */
 # endif
-# ifndef LIBRESSL_VERSION_NUMBER /* forked from OpenSSL 1.0.1g, sets high version "with the idea of discouraging software from relying on magic numbers for detecting features"(!) */
+# if !defined(LIBRESSL_VERSION_NUMBER) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x03050000fL)
 #  if OPENSSL_VERSION_NUMBER >= 0x10100000
 #   undef HAVE_ERR_REMOVE_THREAD_STATE /* 1.1.0-pre4: openssl/openssl@8509dcc9f319190c565ab6baad7c88d37a951d1c */
 #   undef OPENSSL_NO_SSL2              /* 1.1.0-pre4: openssl/openssl@e80381e1a3309f5d4a783bcaa508a90187a48882 */
